<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="./../../resources/templates/baseTemplate.xhtml">
    <ui:define name="content">
        <f:view id="vRoot">
            <p:fieldset legend="Relatório de Participantes">
                <h:form id="frmParticipantes">
                    <!-- Exibição de mensagens gerais -->
                    <p:growl id="gMessages" sticky="false" globalOnly="true" />
                    <p:panelGrid columns="2">
                        <h:outputLabel value="Evento:"/>
                        <p:selectOneMenu id="somRelatorioEventos" 
                                         value="#{relParticipantesBean.evento}"
                                         required="true"
                                         requiredMessage="Selecione o evento."
                                         converter="#{relParticipantesBean.conversorEvento}"
                                         effect="fade">
                            <f:selectItem itemLabel="Selecione um item..." itemValue=""/>
                            <f:selectItems value="#{relParticipantesBean.eventos}" 
                                           var="atual" itemLabel="#{atual.nmeEvento}" 
                                           itemValue="#{atual}"></f:selectItems>

                        </p:selectOneMenu>
                        <p:commandButton value="Gerar Relatório" 
                                         actionListener="#{relParticipantesBean.gerarRelatorio}"
                                         update=":frmParticipantes"/>
                    </p:panelGrid>
                </h:form>
            </p:fieldset>
        </f:view>
    </ui:define>

</ui:composition>
